import { _decorator, Component, Node, Prefab, SpriteFrame } from 'cc';

import AssetModule from '../base/AssetModule';

const { ccclass, property } = _decorator;

@ccclass('AssetComponent')
export class AssetComponent extends Component {

    // SpriteFrame
    @property([SpriteFrame])
    private readonly spFrames: SpriteFrame[] = [];

    // Prefab
    @property([Prefab])
    private readonly prefabs: Prefab[] = [];


    protected onLoad(): void {
        AssetModule.setSpriteFrameList(this.spFrames);
        AssetModule.setPrefabList(this.prefabs);
    }
}

